3.1.2 \(\int (d+e x)^3 (a+b \tanh ^{-1}(c x)) \, dx\) [2]

Optimal. Leaf size=125 \[ \frac {b e \left (6 c^2 d^2+e^2\right ) x}{4 c^3}+\frac {b d e^2 x^2}{2 c}+\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}+\frac {b (c d+e)^4 \log (1-c x)}{8 c^4 e}-\frac {b (c d-e)^4 \log (1+c x)}{8 c^4 e} \]

[Out]

1/4*b*e*(6*c^2*d^2+e^2)*x/c^3+1/2*b*d*e^2*x^2/c+1/12*b*e^3*x^3/c+1/4*(e*x+d)^4*(a+b*arctanh(c*x))/e+1/8*b*(c*d
+e)^4*ln(-c*x+1)/c^4/e-1/8*b*(c*d-e)^4*ln(c*x+1)/c^4/e

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6063, 716, 647, 31} \begin {gather*} \frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}-\frac {b (c d-e)^4 \log (c x+1)}{8 c^4 e}+\frac {b (c d+e)^4 \log (1-c x)}{8 c^4 e}+\frac {b e x \left (6 c^2 d^2+e^2\right )}{4 c^3}+\frac {b d e^2 x^2}{2 c}+\frac {b e^3 x^3}{12 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^3*(a + b*ArcTanh[c*x]),x]

[Out]

(b*e*(6*c^2*d^2 + e^2)*x)/(4*c^3) + (b*d*e^2*x^2)/(2*c) + (b*e^3*x^3)/(12*c) + ((d + e*x)^4*(a + b*ArcTanh[c*x
]))/(4*e) + (b*(c*d + e)^4*Log[1 - c*x])/(8*c^4*e) - (b*(c*d - e)^4*Log[1 + c*x])/(8*c^4*e)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 716

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 6063

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcTanh[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+e x)^3 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}-\frac {(b c) \int \frac {(d+e x)^4}{1-c^2 x^2} \, dx}{4 e}\\ &=\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}-\frac {(b c) \int \left (-\frac {e^2 \left (6 c^2 d^2+e^2\right )}{c^4}-\frac {4 d e^3 x}{c^2}-\frac {e^4 x^2}{c^2}+\frac {c^4 d^4+6 c^2 d^2 e^2+e^4+4 c^2 d e \left (c^2 d^2+e^2\right ) x}{c^4 \left (1-c^2 x^2\right )}\right ) \, dx}{4 e}\\ &=\frac {b e \left (6 c^2 d^2+e^2\right ) x}{4 c^3}+\frac {b d e^2 x^2}{2 c}+\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}-\frac {b \int \frac {c^4 d^4+6 c^2 d^2 e^2+e^4+4 c^2 d e \left (c^2 d^2+e^2\right ) x}{1-c^2 x^2} \, dx}{4 c^3 e}\\ &=\frac {b e \left (6 c^2 d^2+e^2\right ) x}{4 c^3}+\frac {b d e^2 x^2}{2 c}+\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}+\frac {\left (b (c d-e)^4\right ) \int \frac {1}{-c-c^2 x} \, dx}{8 c^2 e}-\frac {\left (b (c d+e)^4\right ) \int \frac {1}{c-c^2 x} \, dx}{8 c^2 e}\\ &=\frac {b e \left (6 c^2 d^2+e^2\right ) x}{4 c^3}+\frac {b d e^2 x^2}{2 c}+\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tanh ^{-1}(c x)\right )}{4 e}+\frac {b (c d+e)^4 \log (1-c x)}{8 c^4 e}-\frac {b (c d-e)^4 \log (1+c x)}{8 c^4 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 205, normalized size = 1.64 \begin {gather*} \frac {6 c \left (4 a c^3 d^3+b e \left (6 c^2 d^2+e^2\right )\right ) x+12 c^3 d e (3 a c d+b e) x^2+2 c^3 e^2 (12 a c d+b e) x^3+6 a c^4 e^3 x^4+6 b c^4 x \left (4 d^3+6 d^2 e x+4 d e^2 x^2+e^3 x^3\right ) \tanh ^{-1}(c x)+3 b \left (4 c^3 d^3+6 c^2 d^2 e+4 c d e^2+e^3\right ) \log (1-c x)+3 b \left (4 c^3 d^3-6 c^2 d^2 e+4 c d e^2-e^3\right ) \log (1+c x)}{24 c^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^3*(a + b*ArcTanh[c*x]),x]

[Out]

(6*c*(4*a*c^3*d^3 + b*e*(6*c^2*d^2 + e^2))*x + 12*c^3*d*e*(3*a*c*d + b*e)*x^2 + 2*c^3*e^2*(12*a*c*d + b*e)*x^3
 + 6*a*c^4*e^3*x^4 + 6*b*c^4*x*(4*d^3 + 6*d^2*e*x + 4*d*e^2*x^2 + e^3*x^3)*ArcTanh[c*x] + 3*b*(4*c^3*d^3 + 6*c
^2*d^2*e + 4*c*d*e^2 + e^3)*Log[1 - c*x] + 3*b*(4*c^3*d^3 - 6*c^2*d^2*e + 4*c*d*e^2 - e^3)*Log[1 + c*x])/(24*c
^4)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(279\) vs. \(2(113)=226\).
time = 0.14, size = 280, normalized size = 2.24

method result size
derivativedivides \(\frac {\frac {\left (c e x +d c \right )^{4} a}{4 c^{3} e}+\frac {b c \arctanh \left (c x \right ) d^{4}}{4 e}+b \arctanh \left (c x \right ) d^{3} c x +\frac {3 b c e \arctanh \left (c x \right ) d^{2} x^{2}}{2}+b c \,e^{2} \arctanh \left (c x \right ) d \,x^{3}+\frac {b c \,e^{3} \arctanh \left (c x \right ) x^{4}}{4}+\frac {3 b e \,d^{2} x}{2}+\frac {b \,e^{2} d \,x^{2}}{2}+\frac {b \,e^{3} x^{3}}{12}+\frac {b \,e^{3} x}{4 c^{2}}+\frac {b c \ln \left (c x -1\right ) d^{4}}{8 e}+\frac {b \ln \left (c x -1\right ) d^{3}}{2}+\frac {3 b e \ln \left (c x -1\right ) d^{2}}{4 c}+\frac {b \,e^{2} \ln \left (c x -1\right ) d}{2 c^{2}}+\frac {b \,e^{3} \ln \left (c x -1\right )}{8 c^{3}}-\frac {b c \ln \left (c x +1\right ) d^{4}}{8 e}+\frac {b \ln \left (c x +1\right ) d^{3}}{2}-\frac {3 b e \ln \left (c x +1\right ) d^{2}}{4 c}+\frac {b \,e^{2} \ln \left (c x +1\right ) d}{2 c^{2}}-\frac {b \,e^{3} \ln \left (c x +1\right )}{8 c^{3}}}{c}\) \(280\)
default \(\frac {\frac {\left (c e x +d c \right )^{4} a}{4 c^{3} e}+\frac {b c \arctanh \left (c x \right ) d^{4}}{4 e}+b \arctanh \left (c x \right ) d^{3} c x +\frac {3 b c e \arctanh \left (c x \right ) d^{2} x^{2}}{2}+b c \,e^{2} \arctanh \left (c x \right ) d \,x^{3}+\frac {b c \,e^{3} \arctanh \left (c x \right ) x^{4}}{4}+\frac {3 b e \,d^{2} x}{2}+\frac {b \,e^{2} d \,x^{2}}{2}+\frac {b \,e^{3} x^{3}}{12}+\frac {b \,e^{3} x}{4 c^{2}}+\frac {b c \ln \left (c x -1\right ) d^{4}}{8 e}+\frac {b \ln \left (c x -1\right ) d^{3}}{2}+\frac {3 b e \ln \left (c x -1\right ) d^{2}}{4 c}+\frac {b \,e^{2} \ln \left (c x -1\right ) d}{2 c^{2}}+\frac {b \,e^{3} \ln \left (c x -1\right )}{8 c^{3}}-\frac {b c \ln \left (c x +1\right ) d^{4}}{8 e}+\frac {b \ln \left (c x +1\right ) d^{3}}{2}-\frac {3 b e \ln \left (c x +1\right ) d^{2}}{4 c}+\frac {b \,e^{2} \ln \left (c x +1\right ) d}{2 c^{2}}-\frac {b \,e^{3} \ln \left (c x +1\right )}{8 c^{3}}}{c}\) \(280\)
risch \(\frac {\left (e x +d \right )^{4} b \ln \left (c x +1\right )}{8 e}-\frac {e^{3} b \,x^{4} \ln \left (-c x +1\right )}{8}-\frac {e^{2} b d \,x^{3} \ln \left (-c x +1\right )}{2}+\frac {e^{3} a \,x^{4}}{4}-\frac {3 e b \,d^{2} x^{2} \ln \left (-c x +1\right )}{4}+e^{2} a d \,x^{3}-\frac {b \,d^{3} x \ln \left (-c x +1\right )}{2}+\frac {3 e a \,d^{2} x^{2}}{2}+\frac {b \,e^{3} x^{3}}{12 c}-\frac {\ln \left (c x +1\right ) b \,d^{4}}{8 e}+a \,d^{3} x +\frac {b d \,e^{2} x^{2}}{2 c}+\frac {\ln \left (c x +1\right ) b \,d^{3}}{2 c}+\frac {\ln \left (-c x +1\right ) b \,d^{3}}{2 c}+\frac {3 e b \,d^{2} x}{2 c}-\frac {3 e \ln \left (c x +1\right ) b \,d^{2}}{4 c^{2}}+\frac {3 e \ln \left (-c x +1\right ) b \,d^{2}}{4 c^{2}}+\frac {e^{2} \ln \left (c x +1\right ) b d}{2 c^{3}}+\frac {e^{2} \ln \left (-c x +1\right ) b d}{2 c^{3}}+\frac {e^{3} b x}{4 c^{3}}-\frac {e^{3} \ln \left (c x +1\right ) b}{8 c^{4}}+\frac {e^{3} \ln \left (-c x +1\right ) b}{8 c^{4}}\) \(308\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^3*(a+b*arctanh(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(1/4*(c*e*x+c*d)^4*a/c^3/e+1/4*b*c/e*arctanh(c*x)*d^4+b*arctanh(c*x)*d^3*c*x+3/2*b*c*e*arctanh(c*x)*d^2*x^
2+b*c*e^2*arctanh(c*x)*d*x^3+1/4*b*c*e^3*arctanh(c*x)*x^4+3/2*b*e*d^2*x+1/2*b*e^2*d*x^2+1/12*b*e^3*x^3+1/4*b/c
^2*e^3*x+1/8*b*c/e*ln(c*x-1)*d^4+1/2*b*ln(c*x-1)*d^3+3/4*b/c*e*ln(c*x-1)*d^2+1/2*b/c^2*e^2*ln(c*x-1)*d+1/8*b/c
^3*e^3*ln(c*x-1)-1/8*b*c/e*ln(c*x+1)*d^4+1/2*b*ln(c*x+1)*d^3-3/4*b/c*e*ln(c*x+1)*d^2+1/2*b/c^2*e^2*ln(c*x+1)*d
-1/8*b/c^3*e^3*ln(c*x+1))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 207, normalized size = 1.66 \begin {gather*} \frac {1}{4} \, a x^{4} e^{3} + a d x^{3} e^{2} + \frac {3}{2} \, a d^{2} x^{2} e + a d^{3} x + \frac {3}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b d^{2} e + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b d^{3}}{2 \, c} + \frac {1}{2} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b d e^{2} + \frac {1}{24} \, {\left (6 \, x^{4} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, {\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac {3 \, \log \left (c x + 1\right )}{c^{5}} + \frac {3 \, \log \left (c x - 1\right )}{c^{5}}\right )}\right )} b e^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/4*a*x^4*e^3 + a*d*x^3*e^2 + 3/2*a*d^2*x^2*e + a*d^3*x + 3/4*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/
c^3 + log(c*x - 1)/c^3))*b*d^2*e + 1/2*(2*c*x*arctanh(c*x) + log(-c^2*x^2 + 1))*b*d^3/c + 1/2*(2*x^3*arctanh(c
*x) + c*(x^2/c^2 + log(c^2*x^2 - 1)/c^4))*b*d*e^2 + 1/24*(6*x^4*arctanh(c*x) + c*(2*(c^2*x^3 + 3*x)/c^4 - 3*lo
g(c*x + 1)/c^5 + 3*log(c*x - 1)/c^5))*b*e^3

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 594 vs. \(2 (111) = 222\).
time = 0.45, size = 594, normalized size = 4.75 \begin {gather*} \frac {24 \, a c^{4} d^{3} x + 2 \, {\left (3 \, a c^{4} x^{4} + b c^{3} x^{3} + 3 \, b c x\right )} \cosh \left (1\right )^{3} + 2 \, {\left (3 \, a c^{4} x^{4} + b c^{3} x^{3} + 3 \, b c x\right )} \sinh \left (1\right )^{3} + 12 \, {\left (2 \, a c^{4} d x^{3} + b c^{3} d x^{2}\right )} \cosh \left (1\right )^{2} + 6 \, {\left (4 \, a c^{4} d x^{3} + 2 \, b c^{3} d x^{2} + {\left (3 \, a c^{4} x^{4} + b c^{3} x^{3} + 3 \, b c x\right )} \cosh \left (1\right )\right )} \sinh \left (1\right )^{2} + 36 \, {\left (a c^{4} d^{2} x^{2} + b c^{3} d^{2} x\right )} \cosh \left (1\right ) + 3 \, {\left (4 \, b c^{3} d^{3} - 6 \, b c^{2} d^{2} \cosh \left (1\right ) + 4 \, b c d \cosh \left (1\right )^{2} - b \cosh \left (1\right )^{3} - b \sinh \left (1\right )^{3} + {\left (4 \, b c d - 3 \, b \cosh \left (1\right )\right )} \sinh \left (1\right )^{2} - {\left (6 \, b c^{2} d^{2} - 8 \, b c d \cosh \left (1\right ) + 3 \, b \cosh \left (1\right )^{2}\right )} \sinh \left (1\right )\right )} \log \left (c x + 1\right ) + 3 \, {\left (4 \, b c^{3} d^{3} + 6 \, b c^{2} d^{2} \cosh \left (1\right ) + 4 \, b c d \cosh \left (1\right )^{2} + b \cosh \left (1\right )^{3} + b \sinh \left (1\right )^{3} + {\left (4 \, b c d + 3 \, b \cosh \left (1\right )\right )} \sinh \left (1\right )^{2} + {\left (6 \, b c^{2} d^{2} + 8 \, b c d \cosh \left (1\right ) + 3 \, b \cosh \left (1\right )^{2}\right )} \sinh \left (1\right )\right )} \log \left (c x - 1\right ) + 3 \, {\left (b c^{4} x^{4} \cosh \left (1\right )^{3} + b c^{4} x^{4} \sinh \left (1\right )^{3} + 4 \, b c^{4} d x^{3} \cosh \left (1\right )^{2} + 6 \, b c^{4} d^{2} x^{2} \cosh \left (1\right ) + 4 \, b c^{4} d^{3} x + {\left (3 \, b c^{4} x^{4} \cosh \left (1\right ) + 4 \, b c^{4} d x^{3}\right )} \sinh \left (1\right )^{2} + {\left (3 \, b c^{4} x^{4} \cosh \left (1\right )^{2} + 8 \, b c^{4} d x^{3} \cosh \left (1\right ) + 6 \, b c^{4} d^{2} x^{2}\right )} \sinh \left (1\right )\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) + 6 \, {\left (6 \, a c^{4} d^{2} x^{2} + 6 \, b c^{3} d^{2} x + {\left (3 \, a c^{4} x^{4} + b c^{3} x^{3} + 3 \, b c x\right )} \cosh \left (1\right )^{2} + 4 \, {\left (2 \, a c^{4} d x^{3} + b c^{3} d x^{2}\right )} \cosh \left (1\right )\right )} \sinh \left (1\right )}{24 \, c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/24*(24*a*c^4*d^3*x + 2*(3*a*c^4*x^4 + b*c^3*x^3 + 3*b*c*x)*cosh(1)^3 + 2*(3*a*c^4*x^4 + b*c^3*x^3 + 3*b*c*x)
*sinh(1)^3 + 12*(2*a*c^4*d*x^3 + b*c^3*d*x^2)*cosh(1)^2 + 6*(4*a*c^4*d*x^3 + 2*b*c^3*d*x^2 + (3*a*c^4*x^4 + b*
c^3*x^3 + 3*b*c*x)*cosh(1))*sinh(1)^2 + 36*(a*c^4*d^2*x^2 + b*c^3*d^2*x)*cosh(1) + 3*(4*b*c^3*d^3 - 6*b*c^2*d^
2*cosh(1) + 4*b*c*d*cosh(1)^2 - b*cosh(1)^3 - b*sinh(1)^3 + (4*b*c*d - 3*b*cosh(1))*sinh(1)^2 - (6*b*c^2*d^2 -
 8*b*c*d*cosh(1) + 3*b*cosh(1)^2)*sinh(1))*log(c*x + 1) + 3*(4*b*c^3*d^3 + 6*b*c^2*d^2*cosh(1) + 4*b*c*d*cosh(
1)^2 + b*cosh(1)^3 + b*sinh(1)^3 + (4*b*c*d + 3*b*cosh(1))*sinh(1)^2 + (6*b*c^2*d^2 + 8*b*c*d*cosh(1) + 3*b*co
sh(1)^2)*sinh(1))*log(c*x - 1) + 3*(b*c^4*x^4*cosh(1)^3 + b*c^4*x^4*sinh(1)^3 + 4*b*c^4*d*x^3*cosh(1)^2 + 6*b*
c^4*d^2*x^2*cosh(1) + 4*b*c^4*d^3*x + (3*b*c^4*x^4*cosh(1) + 4*b*c^4*d*x^3)*sinh(1)^2 + (3*b*c^4*x^4*cosh(1)^2
 + 8*b*c^4*d*x^3*cosh(1) + 6*b*c^4*d^2*x^2)*sinh(1))*log(-(c*x + 1)/(c*x - 1)) + 6*(6*a*c^4*d^2*x^2 + 6*b*c^3*
d^2*x + (3*a*c^4*x^4 + b*c^3*x^3 + 3*b*c*x)*cosh(1)^2 + 4*(2*a*c^4*d*x^3 + b*c^3*d*x^2)*cosh(1))*sinh(1))/c^4

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 279 vs. \(2 (109) = 218\).
time = 0.40, size = 279, normalized size = 2.23 \begin {gather*} \begin {cases} a d^{3} x + \frac {3 a d^{2} e x^{2}}{2} + a d e^{2} x^{3} + \frac {a e^{3} x^{4}}{4} + b d^{3} x \operatorname {atanh}{\left (c x \right )} + \frac {3 b d^{2} e x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + b d e^{2} x^{3} \operatorname {atanh}{\left (c x \right )} + \frac {b e^{3} x^{4} \operatorname {atanh}{\left (c x \right )}}{4} + \frac {b d^{3} \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b d^{3} \operatorname {atanh}{\left (c x \right )}}{c} + \frac {3 b d^{2} e x}{2 c} + \frac {b d e^{2} x^{2}}{2 c} + \frac {b e^{3} x^{3}}{12 c} - \frac {3 b d^{2} e \operatorname {atanh}{\left (c x \right )}}{2 c^{2}} + \frac {b d e^{2} \log {\left (x - \frac {1}{c} \right )}}{c^{3}} + \frac {b d e^{2} \operatorname {atanh}{\left (c x \right )}}{c^{3}} + \frac {b e^{3} x}{4 c^{3}} - \frac {b e^{3} \operatorname {atanh}{\left (c x \right )}}{4 c^{4}} & \text {for}\: c \neq 0 \\a \left (d^{3} x + \frac {3 d^{2} e x^{2}}{2} + d e^{2} x^{3} + \frac {e^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**3*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*d**3*x + 3*a*d**2*e*x**2/2 + a*d*e**2*x**3 + a*e**3*x**4/4 + b*d**3*x*atanh(c*x) + 3*b*d**2*e*x**
2*atanh(c*x)/2 + b*d*e**2*x**3*atanh(c*x) + b*e**3*x**4*atanh(c*x)/4 + b*d**3*log(x - 1/c)/c + b*d**3*atanh(c*
x)/c + 3*b*d**2*e*x/(2*c) + b*d*e**2*x**2/(2*c) + b*e**3*x**3/(12*c) - 3*b*d**2*e*atanh(c*x)/(2*c**2) + b*d*e*
*2*log(x - 1/c)/c**3 + b*d*e**2*atanh(c*x)/c**3 + b*e**3*x/(4*c**3) - b*e**3*atanh(c*x)/(4*c**4), Ne(c, 0)), (
a*(d**3*x + 3*d**2*e*x**2/2 + d*e**2*x**3 + e**3*x**4/4), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 970 vs. \(2 (113) = 226\).
time = 0.42, size = 970, normalized size = 7.76 \begin {gather*} \frac {1}{3} \, c {\left (\frac {3 \, {\left (\frac {{\left (c x + 1\right )}^{3} b c^{3} d^{3}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} b c^{3} d^{3}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} b c^{3} d^{3}}{c x - 1} - b c^{3} d^{3} + \frac {3 \, {\left (c x + 1\right )}^{3} b c^{2} d^{2} e}{{\left (c x - 1\right )}^{3}} - \frac {6 \, {\left (c x + 1\right )}^{2} b c^{2} d^{2} e}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} b c^{2} d^{2} e}{c x - 1} + \frac {3 \, {\left (c x + 1\right )}^{3} b c d e^{2}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} b c d e^{2}}{{\left (c x - 1\right )}^{2}} + \frac {{\left (c x + 1\right )} b c d e^{2}}{c x - 1} - b c d e^{2} + \frac {{\left (c x + 1\right )}^{3} b e^{3}}{{\left (c x - 1\right )}^{3}} + \frac {{\left (c x + 1\right )} b e^{3}}{c x - 1}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{4} c^{5}}{{\left (c x - 1\right )}^{4}} - \frac {4 \, {\left (c x + 1\right )}^{3} c^{5}}{{\left (c x - 1\right )}^{3}} + \frac {6 \, {\left (c x + 1\right )}^{2} c^{5}}{{\left (c x - 1\right )}^{2}} - \frac {4 \, {\left (c x + 1\right )} c^{5}}{c x - 1} + c^{5}} + \frac {\frac {6 \, {\left (c x + 1\right )}^{3} a c^{3} d^{3}}{{\left (c x - 1\right )}^{3}} - \frac {18 \, {\left (c x + 1\right )}^{2} a c^{3} d^{3}}{{\left (c x - 1\right )}^{2}} + \frac {18 \, {\left (c x + 1\right )} a c^{3} d^{3}}{c x - 1} - 6 \, a c^{3} d^{3} + \frac {18 \, {\left (c x + 1\right )}^{3} a c^{2} d^{2} e}{{\left (c x - 1\right )}^{3}} - \frac {36 \, {\left (c x + 1\right )}^{2} a c^{2} d^{2} e}{{\left (c x - 1\right )}^{2}} + \frac {18 \, {\left (c x + 1\right )} a c^{2} d^{2} e}{c x - 1} + \frac {9 \, {\left (c x + 1\right )}^{3} b c^{2} d^{2} e}{{\left (c x - 1\right )}^{3}} - \frac {27 \, {\left (c x + 1\right )}^{2} b c^{2} d^{2} e}{{\left (c x - 1\right )}^{2}} + \frac {27 \, {\left (c x + 1\right )} b c^{2} d^{2} e}{c x - 1} - 9 \, b c^{2} d^{2} e + \frac {18 \, {\left (c x + 1\right )}^{3} a c d e^{2}}{{\left (c x - 1\right )}^{3}} - \frac {18 \, {\left (c x + 1\right )}^{2} a c d e^{2}}{{\left (c x - 1\right )}^{2}} + \frac {6 \, {\left (c x + 1\right )} a c d e^{2}}{c x - 1} - 6 \, a c d e^{2} + \frac {6 \, {\left (c x + 1\right )}^{3} b c d e^{2}}{{\left (c x - 1\right )}^{3}} - \frac {12 \, {\left (c x + 1\right )}^{2} b c d e^{2}}{{\left (c x - 1\right )}^{2}} + \frac {6 \, {\left (c x + 1\right )} b c d e^{2}}{c x - 1} + \frac {6 \, {\left (c x + 1\right )}^{3} a e^{3}}{{\left (c x - 1\right )}^{3}} + \frac {6 \, {\left (c x + 1\right )} a e^{3}}{c x - 1} + \frac {3 \, {\left (c x + 1\right )}^{3} b e^{3}}{{\left (c x - 1\right )}^{3}} - \frac {6 \, {\left (c x + 1\right )}^{2} b e^{3}}{{\left (c x - 1\right )}^{2}} + \frac {5 \, {\left (c x + 1\right )} b e^{3}}{c x - 1} - 2 \, b e^{3}}{\frac {{\left (c x + 1\right )}^{4} c^{5}}{{\left (c x - 1\right )}^{4}} - \frac {4 \, {\left (c x + 1\right )}^{3} c^{5}}{{\left (c x - 1\right )}^{3}} + \frac {6 \, {\left (c x + 1\right )}^{2} c^{5}}{{\left (c x - 1\right )}^{2}} - \frac {4 \, {\left (c x + 1\right )} c^{5}}{c x - 1} + c^{5}} - \frac {3 \, {\left (b c^{2} d^{3} + b d e^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{4}} + \frac {3 \, {\left (b c^{2} d^{3} + b d e^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{4}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

1/3*c*(3*((c*x + 1)^3*b*c^3*d^3/(c*x - 1)^3 - 3*(c*x + 1)^2*b*c^3*d^3/(c*x - 1)^2 + 3*(c*x + 1)*b*c^3*d^3/(c*x
 - 1) - b*c^3*d^3 + 3*(c*x + 1)^3*b*c^2*d^2*e/(c*x - 1)^3 - 6*(c*x + 1)^2*b*c^2*d^2*e/(c*x - 1)^2 + 3*(c*x + 1
)*b*c^2*d^2*e/(c*x - 1) + 3*(c*x + 1)^3*b*c*d*e^2/(c*x - 1)^3 - 3*(c*x + 1)^2*b*c*d*e^2/(c*x - 1)^2 + (c*x + 1
)*b*c*d*e^2/(c*x - 1) - b*c*d*e^2 + (c*x + 1)^3*b*e^3/(c*x - 1)^3 + (c*x + 1)*b*e^3/(c*x - 1))*log(-(c*x + 1)/
(c*x - 1))/((c*x + 1)^4*c^5/(c*x - 1)^4 - 4*(c*x + 1)^3*c^5/(c*x - 1)^3 + 6*(c*x + 1)^2*c^5/(c*x - 1)^2 - 4*(c
*x + 1)*c^5/(c*x - 1) + c^5) + (6*(c*x + 1)^3*a*c^3*d^3/(c*x - 1)^3 - 18*(c*x + 1)^2*a*c^3*d^3/(c*x - 1)^2 + 1
8*(c*x + 1)*a*c^3*d^3/(c*x - 1) - 6*a*c^3*d^3 + 18*(c*x + 1)^3*a*c^2*d^2*e/(c*x - 1)^3 - 36*(c*x + 1)^2*a*c^2*
d^2*e/(c*x - 1)^2 + 18*(c*x + 1)*a*c^2*d^2*e/(c*x - 1) + 9*(c*x + 1)^3*b*c^2*d^2*e/(c*x - 1)^3 - 27*(c*x + 1)^
2*b*c^2*d^2*e/(c*x - 1)^2 + 27*(c*x + 1)*b*c^2*d^2*e/(c*x - 1) - 9*b*c^2*d^2*e + 18*(c*x + 1)^3*a*c*d*e^2/(c*x
 - 1)^3 - 18*(c*x + 1)^2*a*c*d*e^2/(c*x - 1)^2 + 6*(c*x + 1)*a*c*d*e^2/(c*x - 1) - 6*a*c*d*e^2 + 6*(c*x + 1)^3
*b*c*d*e^2/(c*x - 1)^3 - 12*(c*x + 1)^2*b*c*d*e^2/(c*x - 1)^2 + 6*(c*x + 1)*b*c*d*e^2/(c*x - 1) + 6*(c*x + 1)^
3*a*e^3/(c*x - 1)^3 + 6*(c*x + 1)*a*e^3/(c*x - 1) + 3*(c*x + 1)^3*b*e^3/(c*x - 1)^3 - 6*(c*x + 1)^2*b*e^3/(c*x
 - 1)^2 + 5*(c*x + 1)*b*e^3/(c*x - 1) - 2*b*e^3)/((c*x + 1)^4*c^5/(c*x - 1)^4 - 4*(c*x + 1)^3*c^5/(c*x - 1)^3
+ 6*(c*x + 1)^2*c^5/(c*x - 1)^2 - 4*(c*x + 1)*c^5/(c*x - 1) + c^5) - 3*(b*c^2*d^3 + b*d*e^2)*log(-(c*x + 1)/(c
*x - 1) + 1)/c^4 + 3*(b*c^2*d^3 + b*d*e^2)*log(-(c*x + 1)/(c*x - 1))/c^4)

________________________________________________________________________________________

Mupad [B]
time = 1.15, size = 197, normalized size = 1.58 \begin {gather*} \frac {a\,e^3\,x^4}{4}+a\,d^3\,x+\frac {b\,d^3\,\ln \left (c^2\,x^2-1\right )}{2\,c}+\frac {b\,e^3\,x^3}{12\,c}+b\,d^3\,x\,\mathrm {atanh}\left (c\,x\right )+\frac {3\,a\,d^2\,e\,x^2}{2}+a\,d\,e^2\,x^3+\frac {b\,e^3\,x}{4\,c^3}-\frac {b\,e^3\,\mathrm {atanh}\left (c\,x\right )}{4\,c^4}+\frac {b\,e^3\,x^4\,\mathrm {atanh}\left (c\,x\right )}{4}+\frac {3\,b\,d^2\,e\,x}{2\,c}-\frac {3\,b\,d^2\,e\,\mathrm {atanh}\left (c\,x\right )}{2\,c^2}+\frac {3\,b\,d^2\,e\,x^2\,\mathrm {atanh}\left (c\,x\right )}{2}+b\,d\,e^2\,x^3\,\mathrm {atanh}\left (c\,x\right )+\frac {b\,d\,e^2\,\ln \left (c^2\,x^2-1\right )}{2\,c^3}+\frac {b\,d\,e^2\,x^2}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))*(d + e*x)^3,x)

[Out]

(a*e^3*x^4)/4 + a*d^3*x + (b*d^3*log(c^2*x^2 - 1))/(2*c) + (b*e^3*x^3)/(12*c) + b*d^3*x*atanh(c*x) + (3*a*d^2*
e*x^2)/2 + a*d*e^2*x^3 + (b*e^3*x)/(4*c^3) - (b*e^3*atanh(c*x))/(4*c^4) + (b*e^3*x^4*atanh(c*x))/4 + (3*b*d^2*
e*x)/(2*c) - (3*b*d^2*e*atanh(c*x))/(2*c^2) + (3*b*d^2*e*x^2*atanh(c*x))/2 + b*d*e^2*x^3*atanh(c*x) + (b*d*e^2
*log(c^2*x^2 - 1))/(2*c^3) + (b*d*e^2*x^2)/(2*c)

________________________________________________________________________________________